package util.wcl
{
	import mx.collections.ArrayCollection;
	
	public class ArrayHelper
	{
		static public function indexOf(target:ArrayCollection, field:String, search:*):int
		{
			if(target != null) {
				for(var i:int; i<target.length; i++) {
					if(target.getItemAt(i)[field] == search) {
						return i;
					}
				}
			}
			return -1;
		}
	}
}